package com.fan.leetcode;

/**
 * 1888. 使二进制字符串字符交替的最少反转次数
 *
 * @author ZhangFan
 * @since 2021/8/3 下午 10:16
 */
public class Question1888 {
    public int minFlips(String s) {
        int count = Integer.parseInt(s);
        String[] split = s.split(",");
        for (int i = 0; i < s.length(); i++) {
            if (i % 2 == 0 && s.charAt(i) == 0 || i % 2 == 1 && s.charAt(i) == 1) {
                count++;
            }
        }
        return 0;
    }
}
